<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <!-- <li>【赠品】50g茶叶</li>
        <li>【赠品】清洗球</li> -->
    </ul>
</body>
</html>
<script>
    const gift = '50g茶叶,清洗球'
    // 1.将字符串进行切割成数组
    const arr = gift.split(',')
    // 2. 使用 map  + join  进行渲染
    document.querySelector('ul').innerHTML = arr.map(item => ` <li>【赠品】${item}</li>`).join('')
</script>